//SPDX-FileCopyrightText: Copyright 2022-2024 深圳市同心圆网络有限公司
//SPDX-License-Identifier: GPL-3.0-only

package event_dao

import "go.mongodb.org/mongo-driver/mongo"

var ProjectDayEventStatusDao *_ProjectDayEventStatusDao
var ProjectEventIndexDao *_ProjectEventIndexDao
var EventInfoDao *_EventInfoDao

var EventSourceDao *_EventSourceDao
var SourceUserDao *_SourceUserDao
var EventStageDao *_EventStageDao
var EventSourceStateDao *_EventSourceStateDao

var DayAddonInfoDao *_DayAddonInfoDao

var SubscribeDao *_SubscribeDao

func InitDao(mgoDb *mongo.Database) (err error) {
	ProjectDayEventStatusDao, err = newProjectDayEventStatusDao(mgoDb)
	if err != nil {
		return
	}
	ProjectEventIndexDao, err = newProjectEventIndexDao(mgoDb)
	if err != nil {
		return
	}
	EventInfoDao, err = newEventInfoDao(mgoDb)
	if err != nil {
		return
	}
	EventSourceDao, err = newEventSourceDao(mgoDb)
	if err != nil {
		return
	}
	SourceUserDao, err = newSourceUserDao(mgoDb)
	if err != nil {
		return
	}
	EventStageDao, err = newEventStageDao(mgoDb)
	if err != nil {
		return
	}
	EventSourceStateDao, err = newEventSourceStateDao(mgoDb)
	if err != nil {
		return
	}
	DayAddonInfoDao, err = newDayAddonInfoDao(mgoDb)
	if err != nil {
		return
	}
	SubscribeDao, err = newSubscribeDao(mgoDb)
	if err != nil {
		return
	}
	return
}
